<div class="panes_vertical">
  <div class="box">
    <fieldset>
  	<div class="panes_horizontal"> 
  	<form method="post" action="<{$APPLICATION_URL}>/Admin/Email" name="frmForm">    
    <fieldset>
    	<legend><strong>&nbsp;&nbsp;Send email to users&nbsp;&nbsp;</strong></legend>
    	<p>
    		<{$returnMsg}>
    	</p>
    	<p>
            <label>Users:</label>
            <select name="type" id="type">
            	<option value='0'<{if $type == 0}> selected<{/if}>>-- All members --</option>
              	<option value='1'<{if $type == 1}> selected<{/if}>>Member Option 1</option>
              	<option value='2'<{if $type == 2}> selected<{/if}>>Member Option 2</option>
				<option value='3'<{if $type == 3}> selected<{/if}>>Member Option 3</option>
				<option value='4'<{if $type == 4}> selected<{/if}>>Member Option 4</option>
            </select>
        </p>
        <p>
        	<label>Subject:</label>
        	<input type="text" name="subject" id="subject" value="<{$subject}>" style="width: 500px;" /><br>
        </p>
        <p>
        	<label>Content:</label>
          	<textarea name="message" id="message" rows="8" cols="43" class="content"><{$message}></textarea><br>
        </p>
        <p>
        	Variables: [name]
        </p>        
    </fieldset>
    <p>
    	<br />
        <input type="button" name="save" class="button" id="save" value=" Send " onclick="formSubmit();" />
        <input type="hidden" id="actionForm" name="actionForm" value=""/>
        <input type="hidden" id="actionKey" name="actionKey" value="<{$actionKey}>" />
    </p>
    </form>
    </div>
    </fieldset>
  </div>
</div>
<script type="text/javascript">
    function formSubmit()
    {
    	var theform = document.frmForm;

    	theform.actionForm.value = 'submit';
    	theform.submit();
    	return true;
    }
</script>
<script type="text/javascript" src="<{$APPLICATION_URL}>/Libraries/External/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
<!--
	var textareaToEditor = function( textarea )
	{
		var editor = new FCKeditor( textarea.name ) ;
		editor.BasePath = "<{$APPLICATION_URL}>/Libraries/External/fckeditor/";
		editor.Config["CustomConfigurationsPath"] = "<{$APPLICATION_URL}>/Libraries/External/fckeditor/blog_fckconfig.js";
     	editor.Config["DefaultLanguage"] = "en";
    	editor.Config['AutoDetectLanguage'] = false;
    	editor.Height = "500";
    	editor.Width = "100%";
    	//editor.ToolbarSet = "se_blog";
    
    	editor.Config['SkinPath'] = 'skins/silver/';
		return editor ;
	};
	
	FCKeditor.ReplaceAllTextareas = function()
	{
		var textareas = document.getElementsByTagName( 'textarea' ) ;

		for ( var i = 0 ; i < textareas.length ; i++ )
		{
			var editor = null ;
			var textarea = textareas[i] ;
			var name = textarea.name ;

			// The "name" attribute must exist.
			if ( !name || name.length == 0 )
				continue ;

			if ( typeof arguments[0] == 'string' )
			{
				// The textarea class name could be passed as the function
				// parameter.
				var classRegex = new RegExp( '(?:^| )' + arguments[0] + '(?:$| )' ) ;

				if ( !classRegex.test( textarea.className ) )
					continue ;
			}
			else if ( typeof arguments[0] == 'function' )
			{
				// An assertion function could be passed as the function parameter.
				// It must explicitly return "false" to ignore a specific <textarea>.
				editor = textareaToEditor( textarea ) ;
				if ( arguments[0]( textarea, editor ) === false )
					continue ;
			}

			if ( !editor )
				editor = textareaToEditor( textarea ) ;

			editor.ReplaceTextarea() ;
		}
	};	                  
	FCKeditor.ReplaceAllTextareas();
//-->
</script>

